Skip to content

feat: add WASM-based DOT transaction parsing and explanation#8074

Draft
lcovar wants to merge 2 commits intomasterfrom
BTC-0.dot-wasm
Draft

feat: add WASM-based DOT transaction parsing and explanation#8074
lcovar wants to merge 2 commits intomasterfrom
BTC-0.dot-wasm

Conversation

@lcovar
Copy link
Contributor

@lcovar lcovar commented Feb 6, 2026

Summary

Add @bitgo/wasm-dot integration to sdk-coin-dot for parsing, explaining, and building DOT transactions using Rust/WASM instead of @polkadot/api / @substrate/txwrapper-polkadot.

What's included

  • wasmParser.ts — Thin adapter (explainDotTransaction) that calls wasm-dot's explainTransaction() and maps the output to BitGoJS's TransactionExplanation format. Analogous to explainSolTransaction for Solana.

  • dot.ts wiringDot.explainTransaction() delegates to WASM for testnet (tdot), falls back to legacy TransactionBuilder for mainnet (dot). Same pattern as Solana's sol.ts.

  • wasmBuilderByteComparison.ts — Tests verifying WASM-built transactions produce byte-identical signing payloads to legacy txwrapper-polkadot.

Test plan

  • WASM byte comparison tests pass
  • TypeScript compilation clean
  • wasm-dot unit tests pass (28/28)
  • dot.ts unit tests pass (192/192) including WASM explain round-trip tests

@lcovar lcovar force-pushed the BTC-0.dot-wasm branch 2 times, most recently from 8f026fb to 93666ed Compare February 6, 2026 07:20
@lcovar lcovar force-pushed the BTC-0.dot-wasm branch 2 times, most recently from 25ff6c2 to 9573f45 Compare February 19, 2026 23:15
@lcovar lcovar changed the title temp: add WASM integration for DOT feat: add WASM-based DOT transaction parsing and explanation Feb 19, 2026
@lcovar lcovar force-pushed the BTC-0.dot-wasm branch 4 times, most recently from 1c5f22b to cf99374 Compare February 20, 2026 00:11
Add @bitgo/wasm-dot integration for parsing, explaining, and building
DOT transactions using Rust/WASM instead of @polkadot/api.

- wasmParser.ts: adapter that maps wasm-dot's explainTransaction()
  output to BitGoJS TransactionExplanation format (type mapping,
  output/input extraction, fee handling)
- wasmBuilderByteComparison.ts: tests verifying WASM-built transactions
  produce byte-identical signing payloads to legacy txwrapper-polkadot
- Covers: transfers, staking (bond/unbond/withdraw/chill), proxy
  (add/remove), and batch transactions

BTC-0

TICKET: BTC-0
# Conflicts:
#	modules/sdk-coin-dot/package.json
#	yarn.lock

TICKET: BTC-0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments